//
//  FXBuddyList.h
//  FetionDataStructure
//
//  Created by Ronnie on 08-12-2.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "FXTreeNode.h"


@interface FXDataCenter : NSObject {
	// myself infos
	long					myId;
	int						myState;
	int						myExpiresTime;
	NSString*				myNickName;
	NSString*				myImpresa;
	const Fetion_Personal*	myPersonalInfo;
	
	// my buddy list
	FXTreeNode*				myBuddyList;
	
}

- (id)initFromNet;
- (FXTreeNode*)getMyBuddyList;
- (NSString*)getMyNickName;
- (NSString*)getMyImpresa;
- (void)changeHostImpresaTo:(NSString*)newImpresa;
- (int)getMyStatus;
- (void)changeHostStatusTo:(int)status;

// get the all info thought network
- (void)_getMyselfInfo;
- (void)_getMyFriendsInfo;
- (void)PrintBuddyList;
- (void)addGroupById:(int)gid;
- (void)addBuddy:(long)uid toGroup:(int)gid;
- (FXTreeNode*)getFXTreeNodeById:(long)uid;
- (FXTreeNode*)updateInfoById:(long)uid;
- (FXTreeNode*)getGroupNodeById:(int)gid;

@end
